
public class SpecialTiles {
	public void CheckTiles(Player[] player, Integer[] orderTurn, int turn, Block block, monopolyGUI ui){
		int Location = player[orderTurn[turn]].getToken().getLocation();
		if(Location == 2 || Location == 17 || Location == 33){
			int Chest = (int) (16*Math.random() + 1);
			block.getChest().getNumber(player, orderTurn, turn, Location, Chest, ui);
		}
		else if (Location == 7 || Location == 22 || Location == 36){
			int Chance = (int) (16*Math.random() + 1);
			block.getChance().getNumber(player, orderTurn, turn, Location, Chance, ui);
		 }
		else if(Location == 38){
			block.getTax().collectTax(player[orderTurn[turn]], 1000000, ui, 0);
		}
		else if(Location == 4){
			block.getTax().collectTax(player[orderTurn[turn]], 2000000, ui, 1);
		}
		else if(Location == 30){
			ui.createLabelGoToJail();
			player[orderTurn[turn]].setJail(true);
		}
		else if(Location == 10 || Location == 20 || Location == 0){
			ui.setButtons();
		}
		else if(!block.getTitle(player[orderTurn[turn]].getToken().getLocation()).isAvailable()){
			if(block.getTitle(player[orderTurn[turn]].getToken().getLocation()).getOwner() == "null"){
				ui.createLabelBuy();
			}
			else{
				if(!(block.getTitle(player[orderTurn[turn]].getToken().getLocation()).getOwner().equals(player[orderTurn[turn]].getName()))){
					ui.createLabelPay();
				}
			else
				ui.updateButtons();
			}
		}
	}
	public void CheckTiles(Player[] player, Integer[] orderTurn, int turn, Block block, monopolySolo ui){
		int Location = player[orderTurn[turn]].getToken().getLocation();
		if(Location == 2 || Location == 17 || Location == 33){
			int Chest = (int) (16*Math.random() + 1);
			block.getChest().getNumber(player, orderTurn, turn, Location, Chest, ui);
		}
		else if (Location == 7 || Location == 22 || Location == 36){
			int Chance = (int) (16*Math.random() + 1);
			block.getChance().getNumber(player, orderTurn, turn, Location, Chance, ui);
		 }
		else if(Location == 38){
			block.getTax().collectTax(player[orderTurn[turn]], 1000000, ui, 0);
		}
		else if(Location == 4){
			block.getTax().collectTax(player[orderTurn[turn]], 2000000, ui, 1);
		}
		else if(Location == 30){
			ui.createLabelGoToJail();
			player[orderTurn[turn]].setJail(true);
		}
		else if(Location == 10 || Location == 20 || Location == 0){
			ui.setButtons();
		}
		else if(!block.getTitle(player[orderTurn[turn]].getToken().getLocation()).isAvailable()){
			if(block.getTitle(player[orderTurn[turn]].getToken().getLocation()).getOwner() == "null"){
				ui.createLabelBuy();
			}
			else{
				if(!(block.getTitle(player[orderTurn[turn]].getToken().getLocation()).getOwner().equals(player[orderTurn[turn]].getName()))){
					ui.createLabelPay();
				}
			else
				ui.updateButtons();
			}
		}
	}
}